package com.rhok.wthru_client;

public class BasicContactInfo {
	
	private String m_contactName;
	private String m_phone;
	
	public BasicContactInfo(String contactName, String phone) {
		m_contactName = contactName;
		m_phone = phone;
		
	}
	public String getContactName() {
		return m_contactName;
	}
	public void setContactName(String contactName) {
		m_contactName = contactName;
	}
	public String getPhone() {
		return m_phone;
	}
	public void setPhone(String phone) {
		m_phone = phone;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((m_contactName == null) ? 0 : m_contactName.hashCode());
		result = prime * result + ((m_phone == null) ? 0 : m_phone.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BasicContactInfo other = (BasicContactInfo) obj;
		if (m_contactName == null) {
			if (other.m_contactName != null)
				return false;
		} else if (!m_contactName.equals(other.m_contactName))
			return false;
		if (m_phone == null) {
			if (other.m_phone != null)
				return false;
		} else if (!m_phone.equals(other.m_phone))
			return false;
		return true;
	}
	
	public String toString() {
		return "{ contact_name : " + getContactName() + ", phone : " + getPhone() + " }";
	}

}
